﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Universum.Infrastructure.Utils.Extensions
{
	/// <summary>
	/// Extensions on the ViewDataDictionary
	/// </summary>
	public static class ViewDataDictionaryExtension
	{
		public static ViewDataDictionary Append(this ViewDataDictionary viewData, Func<object,object> item)
		{
			viewData.Add(item.Method.GetParameters()[0].Name, item(null));
			return viewData;
		}
	}
}
